package com.beiye.drivertransport.SubActivity;

import android.net.Uri;
import android.os.Bundle;

import com.beiye.drivertransport.R;
import com.beiye.drivertransport.activity.TwoBaseAty;
import com.beiye.drivertransport.config.AppInterfaceConfig;
import com.github.chrisbanes.photoview.PhotoView;
import com.squareup.picasso.Picasso;


import butterknife.OnClick;

/**
 * Copyright (C)
 * FileName: PreviewImgActivity
 * Author: 刘学章
 * Date: 2020/8/27 11:29
 * Description:
 */
public class PreviewImgActivity extends TwoBaseAty {

    PhotoView photoview;

    @Override
    public int getLayoutId() {
        return R.layout.photo_view_layout;
    }

    @Override
    public void initData() {
        photoview = (PhotoView) findViewById(R.id.photoview);
        Bundle bundle=getIntent().getExtras();
        String url=bundle.getString("imgUrl");
        Picasso.with(PreviewImgActivity.this).load(Uri.parse(url)).placeholder(R.mipmap.nophoto).into(photoview);
        /*if (url.contains("aliyuncs.com")) {
            Picasso.with(PreviewImgActivity.this).load(Uri.parse(url)).placeholder(R.mipmap.nophoto).into(photoview);
        } else {
            Picasso.with(PreviewImgActivity.this).load(Uri.parse(url)).placeholder(R.mipmap.nophoto).into(photoview);
        }*/
    }

    @Override
    public void requestData() {

    }


    public void onClick() {
        finish();
    }
}
